package PriorityQueue;

    use parent 'Heap';

    sub new {
        my ($Caller, %args) = (@_);
        my $Class = ref $Caller || $Caller;

        my $self = $Caller->Heap::new(%args);

        return $self;   }

    #*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*#

    sub setQueue {
        my $self = shift;
        my $list = shift;

        $self->setList($list);  }

    sub getQueue {
        my $self = shift;
        return $self->getList; }

    sub printQueue {
        my $self = shift;
        $self->printList();    }

    sub setQueueType {
        my $self = shift;
        my $type = shift;
        $self->setHeaptype($type);  }

    sub getQueueType {
        my $self = shift;
        return $self->getHeaptype;  }

    #*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*#

    sub highest {
        my $self = shift;
        return $self->{list}->[0];  }

    sub push {
        my $self = shift;
        my $element = shift;
        $self->heapPush($element);  }

    sub pop {
        my $self = shift;
        return $self->heapPop;  }

    sub isEmpty {
        return $self->{heapsize} == 0;  }

    # Class end
    1;
